<?php
namespace app\common\model;


/**
 * 规格对应 价格 库存 条码表
 */
class GoodsSpecGoodsPriceModel extends BaseModel {

    protected $table = 'goods_spec_goods_price';

    public function updateByGoodsId($goodsId,$data){
        //删除产品对应的规格
        db($this->table)->where('goods_id',$goodsId)->delete();
        //添加产品对应的规格
        db($this->table)->insertAll($data);
    }
}